/*
 * DocumentTestPanel.h
 *
 *  Created on: 2012-11-3
 *      Author: tutu
 */

#ifndef DOCUMENTTESTPANEL_H_
#define DOCUMENTTESTPANEL_H_

#include <QWidget>
#include <QPushButton>
#include <QLineEdit>
#include "../requester/TDocumentRequester.h"
#include "../requester/TSearchRequester.h"

class DocumentTestPanel : public QWidget
{
	Q_OBJECT

// Member
private:
	QPushButton *_mineButton;
	QPushButton *_favoritedButton;
	QPushButton *_latestUsedButton;
	QPushButton *_sharedButton;
	QLineEdit *_idEdit;
	QPushButton *_deleteButton;
	QLineEdit *_queryEdit;
	QPushButton *_searchButton;
	TDocumentRequesterPointer _requester;
	TSearchRequesterPointer _searchRequester;


// Method
public:
	DocumentTestPanel(QWidget *parent = 0);
	virtual ~DocumentTestPanel();

// Slot
private slots:
	void mineButtonClicked();
	void favoritedButtonClicked();
	void latestUsedButtonClicked();
	void sharedButtonClicked();
	void deleteButtonClicked();
	void searchButtonClicked();
	void requestFinished(bool error, QList<TDocumentPointer> documents);
	void deleteFinished(bool error);
};

#endif /* DOCUMENTTESTPANEL_H_ */
